<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>流程明细</title>
    <#include "/pubHeadStyleTree.html">
</head>
<body>
<div class="layui-tab layui-tab-card" lay-filter="commonDetail">
    <ul class="layui-tab-title">
        <li class="layui-this" lay-id="refer">我提交的流程</li>
        <li lay-id="referApprove">抄送给我的流程</li>
    </ul>
    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <div id="referDiv"></div>
        </div>
    </div>
</div>

<script>
    function changeLoad(url) {
        $("#referDiv").load(url);
    }
    layui.config({
        base: serverPath.systemPath + staticPath.systemPath //静态资源所在路径
    }).extend({
        index: 'index' //主入口模块
    }).use(['index','setter','element'],function(){
        var setter = layui.setter;
        var $ = layui.$;
        var element = layui.element;
        var modelId  =  "${modelId}";

        var referUrl = serverPath.workflowPath + "/workflow/task/view/refList?modelId=" +modelId;
        var referApproveUrl = serverPath.workflowPath + "/workflow/task/view/refListApprove?modelId="+modelId;

        //初始化加载
        changeLoad( referUrl);
        //切换加载内容
        element.on('tab(commonDetail)', function () {
            var layId = this.getAttribute('lay-id');
            switch (layId) {
                case "refer":
                    changeLoad(referUrl);
                    $(".qtip").hide();
                    break;
                case "referApprove":
                    changeLoad(referApproveUrl);
                    $(".qtip").hide();
                    break;
            }
        });

        // // 点击授权人员弹窗
        // authUserClick = function (ownerId) {
        //     layer.open({
        //         type: 2,
        //         title: '人员详细信息',
        //         area: ['600px', '500px'],
        //         shadeClose: true,
        //         content:serverPath.systemPath+setter.openPath + setter.sysLinkPath+ 'sysUser/view/view?userId=' + ownerId
        //     });
        // };
    });
</script>
</body>
</html>